Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update mining-device-sv1 to tracing #1294

Conversation

devworlds
Copy link

@devworlds devworlds commented Dec 12, 2024

Hello, this is my first open-source pr, basically i follow what was asked.

  • update mining-device-sv1 from println! to info! using tracing following mining-device as example.

  • i don't update the eprintln! cause in the issue was mencioned only the println!

well, i hope this help.

the issue: #1286

Copy link
Contributor

github-actions bot commented Dec 12, 2024

🐰 Bencher Report

Branchissue/migrate-sv1-mining-device-to-tracing
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
estimated cycles
(Result Δ%)
Upper Boundary
estimated cycles
(Limit %)
InstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
L1 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
L2 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
RAM AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
get_authorize📈 view plot
🚷 view threshold
8,402.00
(-0.70%)
8,683.66
(96.76%)
📈 view plot
🚷 view threshold
3,655.00
(-2.27%)
3,862.06
(94.64%)
📈 view plot
🚷 view threshold
5,097.00
(-2.73%)
5,447.00
(93.57%)
📈 view plot
🚷 view threshold
10.00
(+30.88%)
14.85
(67.36%)
📈 view plot
🚷 view threshold
93.00
(+2.26%)
95.57
(97.31%)
get_submit📈 view plot
🚷 view threshold
95,290.00
(-0.12%)
95,795.25
(99.47%)
📈 view plot
🚷 view threshold
59,255.00
(-0.31%)
59,713.37
(99.23%)
📈 view plot
🚷 view threshold
85,060.00
(-0.36%)
85,824.28
(99.11%)
📈 view plot
🚷 view threshold
51.00
(+15.40%)
59.32
(85.97%)
📈 view plot
🚷 view threshold
285.00
(+1.64%)
289.98
(98.28%)
get_subscribe📈 view plot
🚷 view threshold
7,877.00
(-1.70%)
8,235.79
(95.64%)
📈 view plot
🚷 view threshold
2,750.00
(-2.70%)
2,940.21
(93.53%)
📈 view plot
🚷 view threshold
3,822.00
(-3.16%)
4,138.00
(92.36%)
📈 view plot
🚷 view threshold
13.00
(+10.49%)
19.39
(67.05%)
📈 view plot
🚷 view threshold
114.00
(-0.45%)
117.72
(96.84%)
serialize_authorize📈 view plot
🚷 view threshold
12,195.00
(-0.66%)
12,518.56
(97.42%)
📈 view plot
🚷 view threshold
5,232.00
(-1.51%)
5,427.05
(96.41%)
📈 view plot
🚷 view threshold
7,265.00
(-1.87%)
7,602.47
(95.56%)
📈 view plot
🚷 view threshold
13.00
(+36.95%)
17.83
(72.90%)
📈 view plot
🚷 view threshold
139.00
(+0.82%)
141.99
(97.89%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,548.00
(-0.65%)
25,183.03
(97.48%)
📈 view plot
🚷 view threshold
9,778.00
(-1.01%)
10,033.89
(97.45%)
📈 view plot
🚷 view threshold
13,778.00
(-1.17%)
14,200.14
(97.03%)
📈 view plot
🚷 view threshold
33.00
(-5.52%)
44.97
(73.38%)
📈 view plot
🚷 view threshold
303.00
(+0.12%)
313.63
(96.61%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,181.00
(-0.49%)
30,708.12
(98.28%)
📈 view plot
🚷 view threshold
11,981.00
(-0.73%)
12,202.60
(98.18%)
📈 view plot
🚷 view threshold
16,941.00
(-0.86%)
17,309.35
(97.87%)
📈 view plot
🚷 view threshold
58.00
(+4.52%)
66.93
(86.66%)
📈 view plot
🚷 view threshold
370.00
(-0.12%)
379.76
(97.43%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,456.00
(-0.02%)
126,786.39
(99.74%)
📈 view plot
🚷 view threshold
73,117.00
(-0.21%)
73,518.09
(99.45%)
📈 view plot
🚷 view threshold
104,761.00
(-0.27%)
105,475.82
(99.32%)
📈 view plot
🚷 view threshold
111.00
(+5.00%)
124.22
(89.36%)
📈 view plot
🚷 view threshold
604.00
(+1.12%)
606.97
(99.51%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
27,791.00
(-0.34%)
28,475.19
(97.60%)
📈 view plot
🚷 view threshold
9,569.00
(-0.76%)
9,752.44
(98.12%)
📈 view plot
🚷 view threshold
13,506.00
(-0.95%)
13,824.12
(97.70%)
📈 view plot
🚷 view threshold
71.00
(+11.66%)
76.05
(93.36%)
📈 view plot
🚷 view threshold
398.00
(-0.02%)
413.04
(96.36%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,193.00
(-0.05%)
115,735.49
(99.53%)
📈 view plot
🚷 view threshold
67,894.00
(-0.28%)
68,416.93
(99.24%)
📈 view plot
🚷 view threshold
97,353.00
(-0.36%)
98,277.55
(99.06%)
📈 view plot
🚷 view threshold
75.00
(+18.49%)
82.33
(91.10%)
📈 view plot
🚷 view threshold
499.00
(+1.33%)
500.25
(99.75%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23,184.00
(-0.51%)
23,872.21
(97.12%)
📈 view plot
🚷 view threshold
8,121.00
(-0.94%)
8,309.26
(97.73%)
📈 view plot
🚷 view threshold
11,409.00
(-1.16%)
11,732.55
(97.24%)
📈 view plot
🚷 view threshold
45.00
(+19.11%)
47.99
(93.77%)
📈 view plot
🚷 view threshold
330.00
(-0.18%)
344.46
(95.80%)
serialize_submit📈 view plot
🚷 view threshold
99,751.00
(-0.08%)
100,227.97
(99.52%)
📈 view plot
🚷 view threshold
61,317.00
(-0.27%)
61,740.71
(99.31%)
📈 view plot
🚷 view threshold
87,916.00
(-0.34%)
88,653.42
(99.17%)
📈 view plot
🚷 view threshold
57.00
(+22.13%)
63.82
(89.32%)
📈 view plot
🚷 view threshold
330.00
(+1.48%)
335.21
(98.45%)
serialize_subscribe📈 view plot
🚷 view threshold
11,364.00
(-0.40%)
11,619.90
(97.80%)
📈 view plot
🚷 view threshold
4,103.00
(-1.71%)
4,280.76
(95.85%)
📈 view plot
🚷 view threshold
5,679.00
(-2.15%)
5,990.46
(94.80%)
📈 view plot
🚷 view threshold
17.00
(+30.93%)
21.54
(78.94%)
📈 view plot
🚷 view threshold
160.00
(+1.08%)
163.28
(97.99%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Dec 12, 2024

🐰 Bencher Report

Branchissue/migrate-sv1-mining-device-to-tracing
Testbedsv2
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
client_sv2_handle_message_common📈 view plot
🚷 view threshold
44.84
(+0.61%)
46.69
(96.04%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
73.25
(-4.69%)
99.84
(73.37%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.70
(+0.24%)
14.76
(99.54%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
251.52
(-5.46%)
300.67
(83.65%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
654.37
(+5.81%)
679.12
(96.36%)
client_sv2_open_channel📈 view plot
🚷 view threshold
162.19
(-0.01%)
187.58
(86.46%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
286.83
(+0.83%)
310.40
(92.41%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
375.92
(-2.02%)
412.41
(91.15%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
166.00
(+3.19%)
172.62
(96.16%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
466.13
(-0.89%)
539.89
(86.34%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
1,051.80
(+5.32%)
1,090.98
(96.41%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Dec 12, 2024

🐰 Bencher Report

Branchissue/migrate-sv1-mining-device-to-tracing
Testbedsv1
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
client-submit-serialize📈 view plot
🚷 view threshold
6,699.10
(+0.85%)
7,079.83
(94.62%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,544.60
(+0.48%)
8,085.67
(93.31%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
8,237.00
(+1.46%)
8,587.19
(95.92%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
884.18
(+2.17%)
926.94
(95.39%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
685.26
(+2.03%)
706.22
(97.03%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
246.53
(-0.63%)
268.40
(91.85%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
155.94
(-0.66%)
164.00
(95.09%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,413.20
(-0.41%)
7,047.91
(90.99%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
272.58
(-2.48%)
304.66
(89.47%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
732.31
(+0.71%)
778.79
(94.03%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
592.46
(+0.40%)
631.85
(93.77%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
202.63
(-1.51%)
216.90
(93.42%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Dec 12, 2024

🐰 Bencher Report

Branchissue/migrate-sv1-mining-device-to-tracing
Testbedsv2
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
estimated cycles
(Result Δ%)
Upper Boundary
estimated cycles
(Limit %)
InstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
L1 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
L2 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
RAM AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
client_sv2_handle_message_common📈 view plot
🚷 view threshold
2,167.00
(+2.96%)
2,219.71
(97.63%)
📈 view plot
🚷 view threshold
473.00
(-0.07%)
488.90
(96.75%)
📈 view plot
🚷 view threshold
732.00
(-0.51%)
757.74
(96.60%)
📈 view plot
🚷 view threshold
7.00
(+35.35%)
13.19
(53.07%)
📈 view plot
🚷 view threshold
40.00
(+4.23%)
41.46
(96.49%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
8,348.00
(+1.61%)
8,366.86
(99.77%)
📈 view plot
🚷 view threshold
2,137.00
(-0.03%)
2,143.08
(99.72%)
📈 view plot
🚷 view threshold
3,153.00
(-0.22%)
3,171.31
(99.42%)
📈 view plot
🚷 view threshold
38.00
(+7.28%)
41.45
(91.67%)
📈 view plot
🚷 view threshold
143.00
(+2.59%)
143.57
(99.60%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6,421.00
(+2.00%)
6,440.96
(99.69%)
📈 view plot
🚷 view threshold
1,750.00
(-0.05%)
1,767.24
(99.02%)
📈 view plot
🚷 view threshold
2,546.00
(-0.26%)
2,576.05
(98.83%)
📈 view plot
🚷 view threshold
19.00
(+11.51%)
24.35
(78.03%)
📈 view plot
🚷 view threshold
108.00
(+3.35%)
108.56
(99.48%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14,850.00
(+0.84%)
14,949.48
(99.33%)
📈 view plot
🚷 view threshold
4,694.00
(-0.02%)
4,711.24
(99.63%)
📈 view plot
🚷 view threshold
6,745.00
(-0.19%)
6,785.34
(99.41%)
📈 view plot
🚷 view threshold
53.00
(+19.80%)
57.92
(91.50%)
📈 view plot
🚷 view threshold
224.00
(+1.19%)
226.99
(98.68%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
27,826.00
(+0.94%)
27,950.15
(99.56%)
📈 view plot
🚷 view threshold
10,645.00
(+0.46%)
10,675.29
(99.72%)
📈 view plot
🚷 view threshold
15,501.00
(+0.51%)
15,554.64
(99.66%)
📈 view plot
🚷 view threshold
92.00
(+11.86%)
94.31
(97.55%)
📈 view plot
🚷 view threshold
339.00
(+1.13%)
342.22
(99.06%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4,519.00
(+3.00%)
4,556.22
(99.18%)
📈 view plot
🚷 view threshold
1,461.00
(-0.02%)
1,476.90
(98.92%)
📈 view plot
🚷 view threshold
2,154.00
(-0.30%)
2,183.59
(98.64%)
📈 view plot
🚷 view threshold
11.00
(+31.71%)
14.99
(73.36%)
📈 view plot
🚷 view threshold
66.00
(+5.72%)
67.19
(98.23%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
14,104.00
(+0.58%)
14,234.28
(99.08%)
📈 view plot
🚷 view threshold
5,064.00
(-0.01%)
5,079.90
(99.69%)
📈 view plot
🚷 view threshold
7,319.00
(-0.10%)
7,351.02
(99.56%)
📈 view plot
🚷 view threshold
41.00
(+15.67%)
45.19
(90.72%)
📈 view plot
🚷 view threshold
188.00
(+0.94%)
192.39
(97.72%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22,854.00
(+0.80%)
22,960.20
(99.54%)
📈 view plot
🚷 view threshold
8,040.00
(+0.14%)
8,058.67
(99.77%)
📈 view plot
🚷 view threshold
11,689.00
(+0.07%)
11,722.91
(99.71%)
📈 view plot
🚷 view threshold
84.00
(+12.28%)
86.28
(97.35%)
📈 view plot
🚷 view threshold
307.00
(+1.19%)
310.62
(98.83%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4,745.00
(+1.25%)
4,786.08
(99.14%)
📈 view plot
🚷 view threshold
1,502.00
(-0.02%)
1,517.90
(98.95%)
📈 view plot
🚷 view threshold
2,275.00
(-0.14%)
2,299.41
(98.94%)
📈 view plot
🚷 view threshold
11.00
(+13.64%)
16.49
(66.71%)
📈 view plot
🚷 view threshold
69.00
(+2.33%)
70.10
(98.44%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16,260.00
(+0.68%)
16,341.19
(99.50%)
📈 view plot
🚷 view threshold
5,963.00
(-0.01%)
5,978.90
(99.73%)
📈 view plot
🚷 view threshold
8,650.00
(-0.16%)
8,691.23
(99.53%)
📈 view plot
🚷 view threshold
52.00
(+30.15%)
53.84
(96.59%)
📈 view plot
🚷 view threshold
210.00
(+0.87%)
213.00
(98.59%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35,748.00
(+0.50%)
35,853.39
(99.71%)
📈 view plot
🚷 view threshold
14,888.00
(+0.18%)
14,909.35
(99.86%)
📈 view plot
🚷 view threshold
21,868.00
(+0.16%)
21,912.19
(99.80%)
📈 view plot
🚷 view threshold
109.00
(+18.03%)
112.47
(96.91%)
📈 view plot
🚷 view threshold
381.00
(+0.46%)
384.90
(98.99%)
🐰 View full continuous benchmarking report in Bencher

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 19.36%. Comparing base (cf4c625) to head (0600602).
Report is 45 commits behind head on main.

Files with missing lines Patch % Lines
...d-client/src/lib/job_declarator/message_handler.rs 0.00% 1 Missing ⚠️
roles/test-utils/mining-device-sv1/src/miner.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1294      +/-   ##
==========================================
+ Coverage   19.30%   19.36%   +0.06%     
==========================================
  Files         164      164              
  Lines       10849    10815      -34     
==========================================
  Hits         2094     2094              
+ Misses       8755     8721      -34     
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_serde_sv2-coverage 3.65% <ø> (ø)
binary_sv2-coverage 5.48% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 25.02% <ø> (ø)
codec_sv2-coverage 0.01% <ø> (ø)
common_messages_sv2-coverage 0.13% <ø> (ø)
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.29% <ø> (ø)
jd_client-coverage 0.00% <0.00%> (ø)
jd_server-coverage 8.82% <ø> (+1.03%) ⬆️
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 2.39% <ø> (ø)
mining-coverage 2.51% <ø> (ø)
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.80% <ø> (+0.09%) ⬆️
noise_sv2-coverage 4.35% <ø> (ø)
pool_sv2-coverage 1.56% <ø> (+0.17%) ⬆️
protocols 24.72% <ø> (ø)
roles 6.62% <0.00%> (+0.06%) ⬆️
roles_logic_sv2-coverage 8.08% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 10.04% <ø> (+0.43%) ⬆️
utils 25.13% <ø> (ø)
v1-coverage 2.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@plebhash plebhash force-pushed the issue/migrate-sv1-mining-device-to-tracing branch from 8d9ed93 to 0600602 Compare December 14, 2024 10:18
@plebhash
Copy link
Collaborator

plebhash commented Dec 14, 2024

obrigado pela contribuicao @devworlds 🇧🇷

rebasing with latest main so I can start reviewing

@plebhash
Copy link
Collaborator

plebhash commented Dec 14, 2024

the commit history is a bit messy

we do things, then we add extra commits to undo them out of regret of what we did in previous commits

the following commits shouldn't exist

@devworlds could you squash those changes into fewer commits that are restricted to the changes that we aim to introduce with the PR?

@plebhash
Copy link
Collaborator

commit 0600602 is weird because it's changing things on other crates (jd_client and translator_sv2)

this PR shouldn't need to touch any crate outside of mining_device_sv1... if we have to change anything on other crates, there's something wrong

@plebhash
Copy link
Collaborator

plebhash commented Dec 14, 2024

i don't update the eprintln! cause in the issue was mencioned only the println!

@devworlds apologies for the limited issue description, it's been fixed

eprintln! should also be replaced

Copy link
Collaborator

@plebhash plebhash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obrigado pela contribuicao @devworlds 🇧🇷

I left some comments on how we can proceed with this PR

@devworlds
Copy link
Author

thanks for clarify, i will update the things!

@devworlds
Copy link
Author

i don't update the eprintln! cause in the issue was mencioned only the println!

@devworlds apologies for the limited issue description, it's been fixed

eprintln! should also be replaced

sure!

@devworlds
Copy link
Author

changing things on other crates (jd

oh, sure! this was changed cause when run the command cargo clippy, was asked to run a command to "solve" the warnings, so i run it, but now i know, that i do not need to change nothing outside the mining-device-sv1.

@devworlds
Copy link
Author

its okay to open another PR, more clean?

@plebhash
Copy link
Collaborator

plebhash commented Dec 19, 2024

its okay to open another PR, more clean?

you can always rebase the commit history on devworlds:issue/migrate-sv1-mining-device-to-tracing, which will automatically update this PR

https://medium.com/nona-web/cleaning-up-commit-history-with-git-rebase-61dc41d2829c

@devworlds
Copy link
Author

-> #1309

@devworlds devworlds closed this Dec 19, 2024
@devworlds devworlds deleted the issue/migrate-sv1-mining-device-to-tracing branch December 19, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants